import Vue from 'vue'
import Router from 'vue-router'
import home from '@/components/home/home'
import user from '@/components/user/user'
import taxi from '@/components/taxi/taxi'
import replace from '@/components/replace/replace'
import bus from '@/components/bus/bus'
import travel from '@/components/user/menuPages/travel'
import setting from '@/components/user/menuPages/setting'
import wallet from '@/components/user/menuPages/wallet'
import paid from '@/components/user/menuPages/paid'
import have from '@/components/user/menuPages/have'
import safe from '@/components/user/menuPages/safe'
import bill from '@/components/user/menuPages/bill'
import driverhome from '@/components/driver/home'
import drivertaxi from '@/components/driver/teltaxi'
import driverorder from '@/components/driver/order'
import Password from '@/components/user/menuPages/Password'
import changedriver from '@/components/user/menuPages/changedriver'
import way from '@/components/user/menuPages/way'
import order from '@/components/order/index'
import accepte from '@/components/order/accepte'
import draccepte from '@/components/driver/accepte'
import loader from '@/components/order/loader'
import suggest from '@/components/suggest/suggest'
import webError from '@/components/webError'
import developing from '@/components/developing'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/home/taxi',
      name: 'home',
      component: home,
      alias:'/' || '/home',
      children: [
        {
          path: 'home/taxi',
          name: 'taxi',
          component: taxi
        },
        {
          path: 'home/replace',
          name: 'repalce',
          component: replace
        },
        {
          path: 'home/bus',
          name: 'bus',
          component: bus
        }
      ]
    },
    {
      path:'/suggest',
      name: 'suggest',
      component: suggest
    },
    {
      path:'/user',
      name:'user',
      component: user,
      children: [
        {
          path: '/user/travel',
          name: 'travel',
          component: travel
        },
        {
          path: '/user/setting',
          name: 'setting',
          component: setting
        },
        {
          path: '/user/wallet',
          name: 'wallet',
          component: wallet
        },
        {
          path: '/user/paid',
          name: 'paid',
          component: paid
        },
        {
          path: '/user/changedriver',
          name: 'changedriver',
          component: changedriver
        },
        {
          path: '/user/have',
          name: 'have',
          component: have
        },
        {
          path: '/user/safe',
          name: 'safe',
          component: safe
        },
        {
          path: '/user/bill',
          name: 'bill',
          component: bill
        },
        {
          path: '/user/way',
          name: 'way',
          component: way
        },
        {
          path: '/user/Password',
          name: 'Password',
          component: Password
        }
      ]
    },
    {
      path: '/driver',
      name: 'driver',
      component: driverhome,
      children: [
        {
          path: '/driver/taxi',
          name: 'drivertaxi',
          component: drivertaxi
        },{
          path:'/driver/order',
          name:'order',
          component:driverorder
        },
        {
          path: '/driver/accepte',
          name:'accepte',
          component: draccepte
        }
      ]
    },
    {
      path:'/order',
      name:'order',
      component: order,
      children: [
        {
          path: '/order/loader',
          name:'loader',
          component: loader
        },
        {
          path: '/order/accepte',
          name:'accepte',
          component: accepte
        }
      ]
    },
    {
      path: '/webError',
      component: webError
    },
    {
      path: '/developing',
      component: developing
    }
  ]
})
